#define _CRT_SECURE_NO_WARNINGS
#include"BTnode.h"

TextBTNode(BTNode* A)
{
	PrevOrder(A);
	printf("\n");

	InOrder(A);
	printf("\n");

	PostOrder(A);
	printf("\n");

	//int size = 0;
	//TreeSize(A, &size);
	//printf("\n");

	int size=TreeSize(A);
	printf("TreeSize:%d\n", size);

	int size2 = TreeLeafSize(A);
	printf("TreeLeafSize:%d\n", size2);

	


}


int main()
{
	BTNode* A = (BTNode*)malloc(sizeof(BTNode));
	A->data = 'A';
	A->left = NULL;
	A->right = NULL;

	BTNode* B = (BTNode*)malloc(sizeof(BTNode));
	B->data = 'B';
	B->left = NULL;
	B->right = NULL;

	BTNode* C = (BTNode*)malloc(sizeof(BTNode));
	C->data = 'C';
	C->left = NULL;
	C->right = NULL;

	BTNode* D = (BTNode*)malloc(sizeof(BTNode));
	D->data = 'D';
	D->left = NULL;
	D->right = NULL;

	BTNode* E = (BTNode*)malloc(sizeof(BTNode));
	E->data = 'E';
	E->left = NULL;
	E->right = NULL;

	A->left = B;
	A->right = C;
	B->left = D;
	B->right = E;
	A->right = C;
	
	TextBTNode(A);
	return 0;
}